﻿<div class="row">
    <div class="form-inline pull-right">
        <button class="btn btn-info waves-effect" ng-click="list.GetPageData(paginationConf.currentPage, paginationConf.itemsPerPage);">
            <span class="glyphicon glyphicon-refresh"></span>
        </button>
    </div>
    <table ng-table="list.tableParams" class="table table-bordered table-hover table-condensed editable-table listTable" ng-form="list.tableForm" disable-filter="list.isAdding" tracked-table="list.tableTracker">
        <tr ng-repeat="row in $data" ng-form="rowForm" tracked-table-row="row">
            <td title="'标题'" filter="{Title: 'text'}" sortable="'Title'">
                <a ng-href="/notice/{{row.Id}}" target="_blank">{{row.Title}}</a>
            </td>
            <td title="'内容'" filter="{Content: 'text'}" sortable="'Content'">
                <a ng-href="/notice/{{row.Id}}" target="_blank" ng-bind-html="row.Content|htmlString"></a>
            </td>
            <td title="'发表时间'">
                {{row.PostDate|date:'yyyy-MM-dd HH:mm'}}
            </td>
            <td title="'修改时间'">
                {{row.ModifyDate|date:'yyyy-MM-dd HH:mm'}}
            </td>
            <td title="'浏览次数'">
                {{row.ViewCount}}
            </td>
            <td title="'开始时间'">
                {{row.StartTime|date:'yyyy-MM-dd'}}
            </td>
            <td title="'结束时间'">
                {{row.EndTime|date:'yyyy-MM-dd'}}
            </td>
            <td title="'状态'">
                {{["未生效","正常","已失效或已下架"][row.NoticeStatus]}}
            </td>
            <td title="'切换状态'">
                <label class="el-switch">
                    <input type="checkbox" name="switch" ng-checked="row.NoticeStatus==1">
                    <span class="el-switch-style" ng-click="changeState(row)"></span>
                </label>
            </td>
            <td title="'操作'" style="width: 120px;">
                <div class="btn-group">
                    <a class="btn btn-success btn-sm waves-effect" ng-href="#/notice/index?id={{row.Id}}">
                        <i class="icon-pencil"></i>
                    </a>
                    <button class="btn btn-danger btn-sm waves-effect" ng-click="list.del(row)">
                        <i class="icon-cross"></i>
                    </button>
                </div>
            </td>
        </tr>
    </table>
    <tm-pagination conf="paginationConf"></tm-pagination>
</div>